import request from '@/utils/request'

export function getList() {
    return request({
        url: '/marketing/turntableDraw/findLowDraw',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
    })
}

export function firstUpdata(data) {
    return request({
        url: '/marketing/turntableDraw/updateLowDraw',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'post',
        data
    })
}

export function getDetails(params) {
    return request({
        url: '/marketing/truntable/findListPrize',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': params.pageNum,
        'pageSize': params.pageSize
        },
        method: 'get',
    })
}
export function getPrizeList(params,id) {
    return request({
        url: '/marketing/truntable/findListWinning?turntablePrizeId='+id,
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': params.pageNum,
        'pageSize': params.pageSize
        },
        method: 'get',
    })
}
//删除

export function delProinfo(id) {
    return request({
        url: '/marketing/truntable/deletePrize?id='+id,
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'delete',
    })
}

export function updateGoods(data) {
    return request({
        url: '/marketing/truntable/updatePrize',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'post',
        data
    })
}
export function whiteList(id) {
    return request({
        url: '/marketing/truntable/findAllWhite?prizeId='+id,
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
    })
}
export function delWhite(id) {
    return request({
        url: '/marketing/truntable/deleteWhite?id='+id,
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'delete',
    })
}
export function createWhite(data) {
    return request({
        url: '/marketing/truntable/addWhite',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'post',
        data
    })
}
//高级设置
export function seniorSetup() {
    return request({
        url: '/marketing/turntableDraw/findHighDraw',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
    })
}

export function settings(data) {
    return request({
        url: '/marketing/turntableDraw/updateHighDraw',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'post',
        data
    })
}
//设置物流信息
export function addTransByWinning(params) {
    return request({
        url: '/marketing/truntable/addTransByWinning',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
        params
    })
}
//查看物流信息
export function showTransByWinning(id) {
    return request({
        url: '/marketing/truntable/getTurntableWinnigById?turntableWinningId='+id,
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        },
        method: 'get',
    })
}